//
//  EnvironmentManager.m
//  BizLeader
//
//  Created by mac on 2018/3/31.
//  Copyright © 2018年 biz. All rights reserved.
//

#import "EnvironmentManager.h"

static NSString *kCurrentEnvironmentKey = @"kCurrentEnvironmentKey";

@implementation EnvironmentManager
+ (EnvironmentManager*)sharedInstance {
    static dispatch_once_t once;
    static EnvironmentManager *sharedInstance;
    dispatch_once(&once, ^{
        sharedInstance = [[EnvironmentManager alloc] init];
    });
    return sharedInstance;
}

+ (void)translateEnvironment {

}

- (void)setEnvType:(EnvironmentType)envType {
    [[NSUserDefaults standardUserDefaults] setInteger:envType forKey:kCurrentEnvironmentKey];
    [[NSUserDefaults standardUserDefaults] synchronize];
}
- (EnvironmentType)envType {
    return [[NSUserDefaults standardUserDefaults] integerForKey:kCurrentEnvironmentKey];
}

@end
